//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.Collections.Specialized;
			using System.ComponentModel;
			using System.Configuration;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Drawing;
			using System;
			using System.Threading;
			using System.Windows.Forms;
			using Utility;
			
		#endregion
		
	public class frmBackupSchedule : Form
	
	{
		
		#region Fields
			private NumericUpDown cboDaily;
			private NumericUpDown cboDailyFrequencyTime;
			private NumericUpDown cboEveryDayOfMonth;
			private NumericUpDown cboMonthly;
			private ComboBox cboTimeUnit;
			private NumericUpDown cboWeekly;
			private CheckBox chkFri;
			private CheckBox chkMon;
			private CheckBox chkSat;
			private CheckBox chkSun;
			private CheckBox chkThur;
			private CheckBox chkTue;
			private CheckBox chkWen;
			private Button cmdCancel;
			private Button cmdOk;
			private Button cmdOpenFile;
			private Container components;
			private string connStr;
			private string connStrMaster;
			private Database_Com db;
			private DateTimePicker dtpBeginAtTime;
			private DateTimePicker dtpEndAtTime;
			private DateTimePicker dtpOccursAtTime;
			private GroupBox gbBackup;
			private GroupBox gbDaily;
			private GroupBox gbDailyFrequency;
			private GroupBox gbMonthly;
			private GroupBox gbOccurs;
			private GroupBox gbWeekly;
			private Label label1;
			private Label label2;
			private Label label3;
			private Label label4;
			private Label label5;
			private Label label6;
			private Label label7;
			private Label label8;
			private Label lblDay;
			private Label lblEvery;
			private RadioButton rbDaily;
			private RadioButton rbMonthly;
			private RadioButton rbOccursAt;
			private RadioButton rbOccursEvery;
			private RadioButton rbWeekly;
			private RadioButton rdBackupAuto;
			private RadioButton rdBackupManual;
			private SplashScreen sp;
			private Thread th1;
			private TextBox txtFilePath;
		#endregion
		
		#region Constructors
		
			public frmBackupSchedule ()
			
			{
				this.db = new Database_Com ();
				this.components = ((System.ComponentModel.Container) null);
				this.InitializeComponent ();
				this.connStr = Connection.ConnectionString ();
				this.connStrMaster = ConfigurationSettings.AppSettings["SqlCnnStringMaster"];
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void cmdCancel_Click (object sender, EventArgs e)
			
			{
				base.Close ();
				return;
			}
			
			private void cmdOk_Click (object sender, EventArgs e)
			
			{
				int i;
				string theString;
				string theString2;
				int i2;
				int i3;
				int i4;
				int i5;
				string theString3;
				DateTime theDateTime;
				DateTime theDateTime2;
				DateTime theDateTime3;
				decimal theDecimal;
				decimal theDecimal2;
				decimal theDecimal3;
				decimal theDecimal4;
				string[] theStringArray;
				SqlDbType[] theSqlDbTypeArray;
				object[] theObjectArray;
				string[] theStringArray2;
				SqlDbType[] theSqlDbTypeArray2;
				object[] theObjectArray2;
				if (! this.rdBackupAuto.Checked)
				{
					goto L_045D;
				}
				i = 0;
				theString = "";
				theString2 = "";
				i2 = 0;
				i3 = 0;
				i4 = 0;
				i5 = 0;
				if (this.dtpBeginAtTime.Value < this.dtpEndAtTime.Value)
				{
					goto L_006B;
				}
				if (! this.rbOccursEvery.Checked)
				{
					goto L_006B;
				}
				DialogResult theDialogResult = MessageBox.Show ("Th?i gian b?t ??u ph?i nh? h?n th?i gian k?t th?c", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_045D;
				
			L_006B:
				
				{
				}
				if (! this.rbOccursEvery.Checked)
				{
					goto L_00E2;
				}
				if (this.cboTimeUnit.SelectedItem.ToString () != "Minute(s)")
				{
					goto L_0098;
				}
				i = 4;
				goto L_00B6;
				
			L_0098:
				
				{
				}
				if (this.cboTimeUnit.SelectedItem.ToString () != "Hour(s)")
				{
					goto L_00B6;
				}
				i = 8;
				
			L_00B6:
				
				{
				}
				theDateTime = this.dtpBeginAtTime.Value;
				theString = theDateTime.ToLongTimeString ();
				theDateTime2 = this.dtpEndAtTime.Value;
				theString2 = theDateTime2.ToLongTimeString ();
				goto L_010C;
				
			L_00E2:
				
				{
				}
				if (! this.rbOccursAt.Checked)
				{
					goto L_010C;
				}
				i = 1;
				theDateTime3 = this.dtpOccursAtTime.Value;
				theString = theDateTime3.ToLongTimeString ();
				theString2 = "235959";
				
			L_010C:
				
				{
				}
				if (theString.Substring (((int) (theString.Length - 2))) != "PM")
				{
					goto L_015A;
				}
				theString = string.Concat ((i5 = ((int) (int.Parse (theString.Substring (0, theString.IndexOf ('\u003A'))) + 12))).ToString (), theString.Substring (theString.IndexOf ('\u003A')));
				
			L_015A:
				
				{
				}
				theString = theString.Substring (0, ((int) (theString.Length - 2)));
				theString = theString.Replace (":", "");
				if (theString2.Substring (((int) (theString2.Length - 2))) != "PM")
				{
					goto L_01C9;
				}
				theString2 = string.Concat ((i5 = ((int) (int.Parse (theString2.Substring (0, theString2.IndexOf ('\u003A'))) + 12))).ToString (), theString2.Substring (theString2.IndexOf ('\u003A')));
				
			L_01C9:
				
				{
				}
				theString2 = theString2.Substring (0, ((int) (theString2.Length - 2)));
				theString2 = theString2.Replace (":", "");
				if (! this.rbDaily.Checked)
				{
					goto L_021C;
				}
				i2 = 4;
				i3 = int.Parse ((theDecimal = this.cboDaily.Value).ToString ());
				i4 = 0;
				goto L_0319;
				
			L_021C:
				
				{
				}
				if (! this.rbWeekly.Checked)
				{
					goto L_02D3;
				}
				i2 = 8;
				i4 = int.Parse ((theDecimal2 = this.cboWeekly.Value).ToString ());
				if (! this.chkSun.Checked)
				{
					goto L_025C;
				}
				i3++;
				
			L_025C:
				
				{
				}
				if (! this.chkMon.Checked)
				{
					goto L_026F;
				}
				i3 += 2;
				
			L_026F:
				
				{
				}
				if (! this.chkTue.Checked)
				{
					goto L_0282;
				}
				i3 += 4;
				
			L_0282:
				
				{
				}
				if (! this.chkWen.Checked)
				{
					goto L_0295;
				}
				i3 += 8;
				
			L_0295:
				
				{
				}
				if (! this.chkThur.Checked)
				{
					goto L_02A9;
				}
				i3 += 16;
				
			L_02A9:
				
				{
				}
				if (! this.chkFri.Checked)
				{
					goto L_02BD;
				}
				i3 += 32;
				
			L_02BD:
				
				{
				}
				if (! this.chkSat.Checked)
				{
					goto L_02D1;
				}
				i3 += 64;
				
			L_02D1:
				
				{
				}
				goto L_0319;
				
			L_02D3:
				
				{
				}
				if (! this.rbMonthly.Checked)
				{
					goto L_0319;
				}
				i3 = int.Parse ((theDecimal3 = this.cboEveryDayOfMonth.Value).ToString ());
				i4 = int.Parse ((theDecimal4 = this.cboMonthly.Value).ToString ());
				i2 = 16;
				
			L_0319:
				try
				{
					SqlConnection theSqlConnection = this.db.CreateConnections ();
					theStringArray = new string[8];
					theStringArray[0] = "@freqType";
					theStringArray[1] = "@freqInterval";
					theStringArray[2] = "@freqSubdayType";
					theStringArray[3] = "@freqSubdayInterval";
					theStringArray[4] = "@activeStartTime";
					theStringArray[5] = "@activeEndTime";
					theStringArray[6] = "@freqRecurrenceFactor";
					theStringArray[7] = "@filepath";
					theSqlDbTypeArray = new SqlDbType[8];
					theSqlDbTypeArray[0] = SqlDbType.Int;
					theSqlDbTypeArray[1] = SqlDbType.Int;
					theSqlDbTypeArray[2] = SqlDbType.Int;
					theSqlDbTypeArray[3] = SqlDbType.Int;
					theSqlDbTypeArray[4] = SqlDbType.Int;
					theSqlDbTypeArray[5] = SqlDbType.Int;
					theSqlDbTypeArray[6] = SqlDbType.Int;
					theSqlDbTypeArray[7] = SqlDbType.VarChar;
					theObjectArray = new object[8];
					theObjectArray[0] = i2;
					theObjectArray[1] = i3;
					theObjectArray[2] = i;
					theObjectArray[3] = this.cboDailyFrequencyTime.Value;
					theObjectArray[4] = int.Parse (theString);
					theObjectArray[5] = int.Parse (theString2);
					theObjectArray[6] = i4;
					theObjectArray[7] = this.txtFilePath.Text;
					this.db.ExecuteStoredProc ("sp_BackUpAuto", theStringArray, theSqlDbTypeArray, theObjectArray);
					DialogResult theDialogResult2 = MessageBox.Show ("Backup schedule successful", "Backup schedule", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
					goto L_05D0;
				}
				catch
				{
					
				L_0447:
					
					{
					}
					DialogResult theDialogResult3 = MessageBox.Show ("Backup b? l?i. Xin vui l?ng ki?m tra l?i t?n ???ng d?n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				}
				
			L_045D:
				
				{
				}
				if (! this.rdBackupManual.Checked)
				{
					goto L_05D0;
				}
				if (this.txtFilePath.Text != "")
				{
					goto L_049C;
				}
				DialogResult theDialogResult4 = MessageBox.Show ("xin vui l?ng ch?n file backup", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_05D0;
				
			L_049C:
				
				{
				}
				theString3 = "";
				theString3 = this.txtFilePath.Text;
				base.ParentForm.Cursor = Cursors.AppStarting;
				this.th1 = new Thread (new ThreadStart (this.Thread1));
				this.th1.Start ();
				this.Cursor = Cursors.WaitCursor;
				
			L_04ED:
				try
				{
					SqlConnection theSqlConnection2 = this.db.CreateConnections ();
					theStringArray2 = new string[2];
					theStringArray2[0] = "@fileName";
					theStringArray2[1] = "@filePath";
					theSqlDbTypeArray2 = new SqlDbType[2];
					theSqlDbTypeArray2[0] = SqlDbType.VarChar;
					theSqlDbTypeArray2[1] = SqlDbType.VarChar;
					theObjectArray2 = new object[2];
					theObjectArray2[0] = theString3.Substring (((int) (theString3.LastIndexOf ("\\") + 1)));
					theObjectArray2[1] = theString3.Substring (0, ((int) (theString3.LastIndexOf ("\\") + 1)));
					this.db.ExecuteStoredProc ("sp_BackUpManual", theStringArray2, theSqlDbTypeArray2, theObjectArray2);
				}
				catch
				{
					
				L_057A:
					
					{
					}
					DialogResult theDialogResult5 = MessageBox.Show ("Backup b? l?i. Xin vui l?ng ki?m tra l?i t?n ???ng d?n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				}
				
			L_0590:
				
				{
				}
				this.sp.EndDisplay ();
				this.th1 = ((Thread) null);
				this.Cursor = Cursors.Arrow;
				base.ParentForm.Cursor = Cursors.Arrow;
				DialogResult theDialogResult6 = MessageBox.Show ("Backup successful", "Backup", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				
			L_05D0:
				return;
			}
			
			private void cmdOpenFile_Click (object sender, EventArgs e)
			
			{
				OpenFileDialog theOpenFileDialog;
				theOpenFileDialog = new OpenFileDialog ();
				theOpenFileDialog.FilterIndex = 1;
				theOpenFileDialog.RestoreDirectory = true;
				if (theOpenFileDialog.ShowDialog () != DialogResult.OK)
				{
					goto L_002E;
				}
				this.txtFilePath.Text = theOpenFileDialog.FileName;
				
			L_002E:
				return;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				if (! disposing)
				{
					goto L_0016;
				}
				if (this.components == null)
				{
					goto L_0016;
				}
				this.components.Dispose ();
				
			L_0016:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void frmBackupSchedule_Load (object sender, EventArgs e)
			
			{
				SqlConnection theSqlConnection;
				SqlCommand theSqlCommand;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				string theString;
				string theString2;
				string theString3;
				int i;
				DateTime theDateTime;
				int i2;
				int i3;
				int i4;
				int i5;
				this.gbDaily.Visible = false;
				this.gbMonthly.Visible = false;
				this.gbWeekly.Visible = false;
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlCommand = new SqlCommand ("SELECT freqType, freqInterval, freqSubdayType, freqSubdayInterval, activeStartTi"
				+ "me, activeEndTime, freqRecurrenceFactor FROM  BackupInfo Where bckISN = (Select "
				+ "max(bckISN) From BackupInfo)", theSqlConnection);
				theSqlDataAdapter = new SqlDataAdapter (theSqlCommand);
				theDataSet = new DataSet ();
				int i6 = theSqlDataAdapter.Fill (theDataSet, "BackupInfo");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_008F;
				}
				
			L_007E:
				
				{
				}
				this.rdBackupManual.Checked = true;
				goto L_0598;
				
			L_008F:
				
				{
				}
				this.rdBackupAuto.Checked = true;
				theString = "";
				theString2 = "";
				theString = theDataSet.Tables[0].Rows[0]["activeStartTime"].ToString ();
				theString2 = theDataSet.Tables[0].Rows[0]["activeEndTime"].ToString ();
				theDateTime = DateTime.Now;
				theString3 = theDateTime.ToShortDateString ();
				i2 = theString.Length;
				if (i2.ToString () != "5")
				{
					goto L_0145;
				}
				theString = theString.Insert (2, ":");
				theString = theString.Insert (4, ":");
				goto L_017F;
				
			L_0145:
				
				{
				}
				i3 = theString.Length;
				if (i3.ToString () != "6")
				{
					goto L_017F;
				}
				theString = theString.Insert (2, ":");
				theString = theString.Insert (5, ":");
				
			L_017F:
				
				{
				}
				i4 = theString2.Length;
				if (i4.ToString () != "5")
				{
					goto L_01BB;
				}
				theString2 = theString2.Insert (2, ":");
				theString2 = theString2.Insert (4, ":");
				goto L_01F5;
				
			L_01BB:
				
				{
				}
				i5 = theString2.Length;
				if (i5.ToString () != "6")
				{
					goto L_01F5;
				}
				theString2 = theString2.Insert (2, ":");
				theString2 = theString2.Insert (5, ":");
				
			L_01F5:
				
				{
				}
				theString = string.Concat (theString3, " ", theString);
				theString2 = string.Concat (theString3, " ", theString2);
				if (theDataSet.Tables[0].Rows[0]["freqType"].ToString () != "4")
				{
					goto L_028E;
				}
				this.rbDaily.Checked = true;
				this.cboDaily.Value = decimal.Parse (theDataSet.Tables[0].Rows[0]["freqInterval"].ToString ());
				goto L_0489;
				
			L_028E:
				
				{
				}
				if (theDataSet.Tables[0].Rows[0]["freqType"].ToString () != "8")
				{
					goto L_03DF;
				}
				this.cboWeekly.Value = decimal.Parse (theDataSet.Tables[0].Rows[0]["freqRecurrenceFactor"].ToString ());
				i = int.Parse (theDataSet.Tables[0].Rows[0]["freqInterval"].ToString ());
				this.rbWeekly.Checked = true;
				if ((i % 2) == 0)
				{
					goto L_034A;
				}
				this.chkSun.Checked = true;
				i--;
				
			L_034A:
				
				{
				}
				if (i < 64)
				{
					goto L_0363;
				}
				this.chkSat.Checked = true;
				i -= 64;
				
			L_0363:
				
				{
				}
				if (i < 32)
				{
					goto L_037C;
				}
				this.chkFri.Checked = true;
				i -= 32;
				
			L_037C:
				
				{
				}
				if (i < 16)
				{
					goto L_0395;
				}
				this.chkThur.Checked = true;
				i -= 16;
				
			L_0395:
				
				{
				}
				if (i < 8)
				{
					goto L_03AC;
				}
				this.chkWen.Checked = true;
				i -= 8;
				
			L_03AC:
				
				{
				}
				if (i < 4)
				{
					goto L_03C3;
				}
				this.chkTue.Checked = true;
				i -= 4;
				
			L_03C3:
				
				{
				}
				if (i < 2)
				{
					goto L_03DA;
				}
				this.chkMon.Checked = true;
				i -= 2;
				
			L_03DA:
				
				{
				}
				goto L_0489;
				
			L_03DF:
				
				{
				}
				if (theDataSet.Tables[0].Rows[0]["freqType"].ToString () != "16")
				{
					goto L_0489;
				}
				this.rbMonthly.Checked = true;
				this.cboEveryDayOfMonth.Value = decimal.Parse (theDataSet.Tables[0].Rows[0]["freqInterval"].ToString ());
				this.cboMonthly.Value = decimal.Parse (theDataSet.Tables[0].Rows[0]["freqRecurrenceFactor"].ToString ());
				
			L_0489:
				
				{
				}
				if (theDataSet.Tables[0].Rows[0]["freqSubdayType"].ToString () != "1")
				{
					goto L_04DE;
				}
				this.rbOccursAt.Checked = true;
				this.dtpOccursAtTime.Value = DateTime.Parse (theString);
				goto L_0598;
				
			L_04DE:
				
				{
				}
				this.rbOccursEvery.Checked = true;
				this.dtpBeginAtTime.Value = DateTime.Parse (theString);
				this.dtpEndAtTime.Value = DateTime.Parse (theString2);
				if (theDataSet.Tables[0].Rows[0]["freqSubdayType"].ToString () != "4")
				{
					goto L_0552;
				}
				this.cboTimeUnit.SelectedItem = "Minute(s)";
				goto L_0562;
				
			L_0552:
				
				{
				}
				this.cboTimeUnit.SelectedItem = "Hour(s)";
				
			L_0562:
				
				{
				}
				this.cboDailyFrequencyTime.Value = decimal.Parse (theDataSet.Tables[0].Rows[0]["freqSubdayInterval"].ToString ());
				
			L_0598:
				return;
			}
			
			private void InitializeComponent ()
			
			{
				Control[] theControlArray;
				Control[] theControlArray2;
				int[] theInt32Array;
				int[] theInt32Array2;
				int[] theInt32Array3;
				Control[] theControlArray3;
				int[] theInt32Array4;
				int[] theInt32Array5;
				int[] theInt32Array6;
				Control[] theControlArray4;
				int[] theInt32Array7;
				int[] theInt32Array8;
				int[] theInt32Array9;
				int[] theInt32Array10;
				int[] theInt32Array11;
				int[] theInt32Array12;
				Control[] theControlArray5;
				object[] theObjectArray;
				int[] theInt32Array13;
				int[] theInt32Array14;
				int[] theInt32Array15;
				Control[] theControlArray6;
				Control[] theControlArray7;
				this.gbOccurs = new GroupBox ();
				this.rbDaily = new RadioButton ();
				this.rbWeekly = new RadioButton ();
				this.rbMonthly = new RadioButton ();
				this.gbDaily = new GroupBox ();
				this.cboDaily = new NumericUpDown ();
				this.lblDay = new Label ();
				this.lblEvery = new Label ();
				this.label1 = new Label ();
				this.gbWeekly = new GroupBox ();
				this.chkSun = new CheckBox ();
				this.chkSat = new CheckBox ();
				this.chkFri = new CheckBox ();
				this.chkThur = new CheckBox ();
				this.chkWen = new CheckBox ();
				this.chkTue = new CheckBox ();
				this.chkMon = new CheckBox ();
				this.label2 = new Label ();
				this.cboWeekly = new NumericUpDown ();
				this.label3 = new Label ();
				this.gbMonthly = new GroupBox ();
				this.label6 = new Label ();
				this.cboMonthly = new NumericUpDown ();
				this.label5 = new Label ();
				this.label4 = new Label ();
				this.cboEveryDayOfMonth = new NumericUpDown ();
				this.gbDailyFrequency = new GroupBox ();
				this.dtpEndAtTime = new DateTimePicker ();
				this.label8 = new Label ();
				this.dtpBeginAtTime = new DateTimePicker ();
				this.label7 = new Label ();
				this.cboTimeUnit = new ComboBox ();
				this.dtpOccursAtTime = new DateTimePicker ();
				this.rbOccursEvery = new RadioButton ();
				this.rbOccursAt = new RadioButton ();
				this.cboDailyFrequencyTime = new NumericUpDown ();
				this.cmdOk = new Button ();
				this.cmdCancel = new Button ();
				this.gbBackup = new GroupBox ();
				this.rdBackupAuto = new RadioButton ();
				this.rdBackupManual = new RadioButton ();
				this.txtFilePath = new TextBox ();
				this.cmdOpenFile = new Button ();
				this.gbOccurs.SuspendLayout ();
				this.gbDaily.SuspendLayout ();
				((ISupportInitialize) this.cboDaily).BeginInit ();
				this.gbWeekly.SuspendLayout ();
				((ISupportInitialize) this.cboWeekly).BeginInit ();
				this.gbMonthly.SuspendLayout ();
				((ISupportInitialize) this.cboMonthly).BeginInit ();
				((ISupportInitialize) this.cboEveryDayOfMonth).BeginInit ();
				this.gbDailyFrequency.SuspendLayout ();
				((ISupportInitialize) this.cboDailyFrequencyTime).BeginInit ();
				this.gbBackup.SuspendLayout ();
				base.SuspendLayout ();
				theControlArray = new Control[3];
				theControlArray[0] = ((Control) this.rbDaily);
				theControlArray[1] = ((Control) this.rbWeekly);
				theControlArray[2] = ((Control) this.rbMonthly);
				this.gbOccurs.Controls.AddRange (theControlArray);
				this.gbOccurs.Location = new Point (8, 56);
				this.gbOccurs.Name = "gbOccurs";
				this.gbOccurs.Size = new System.Drawing.Size (96, 96);
				this.gbOccurs.TabIndex = 0;
				this.gbOccurs.TabStop = false;
				this.gbOccurs.Text = "X?y ra";
				this.rbDaily.Location = new Point (8, 16);
				this.rbDaily.Name = "rbDaily";
				this.rbDaily.Size = new System.Drawing.Size (80, 24);
				this.rbDaily.TabIndex = 1;
				this.rbDaily.Text = "M?i ng?y";
				this.rbDaily.CheckedChanged += new EventHandler (this.rbDaily_CheckedChanged);
				this.rbWeekly.Location = new Point (8, 40);
				this.rbWeekly.Name = "rbWeekly";
				this.rbWeekly.Size = new System.Drawing.Size (80, 24);
				this.rbWeekly.TabIndex = 2;
				this.rbWeekly.Text = "M?i tu?n";
				this.rbWeekly.CheckedChanged += new EventHandler (this.rbWeekly_CheckedChanged);
				this.rbMonthly.Location = new Point (8, 64);
				this.rbMonthly.Name = "rbMonthly";
				this.rbMonthly.Size = new System.Drawing.Size (72, 24);
				this.rbMonthly.TabIndex = 3;
				this.rbMonthly.Text = "M?i th?ng";
				this.rbMonthly.CheckedChanged += new EventHandler (this.rbMonthly_CheckedChanged);
				theControlArray2 = new Control[4];
				theControlArray2[0] = ((Control) this.cboDaily);
				theControlArray2[1] = ((Control) this.lblDay);
				theControlArray2[2] = ((Control) this.lblEvery);
				theControlArray2[3] = ((Control) this.label1);
				this.gbDaily.Controls.AddRange (theControlArray2);
				this.gbDaily.Location = new Point (112, 56);
				this.gbDaily.Name = "gbDaily";
				this.gbDaily.Size = new System.Drawing.Size (336, 96);
				this.gbDaily.TabIndex = 1;
				this.gbDaily.TabStop = false;
				this.gbDaily.Text = "M?i ng?y";
				this.cboDaily.Location = new Point (44, 24);
				theInt32Array = new int[4];
				theInt32Array[0] = 1000;
				this.cboDaily.Maximum = new decimal (theInt32Array);
				theInt32Array2 = new int[4];
				theInt32Array2[0] = 1;
				this.cboDaily.Minimum = new decimal (theInt32Array2);
				this.cboDaily.Name = "cboDaily";
				this.cboDaily.Size = new System.Drawing.Size (44, 20);
				this.cboDaily.TabIndex = 2;
				theInt32Array3 = new int[4];
				theInt32Array3[0] = 1;
				this.cboDaily.Value = new decimal (theInt32Array3);
				this.lblDay.Location = new Point (104, 24);
				this.lblDay.Name = "lblDay";
				this.lblDay.Size = new System.Drawing.Size (40, 16);
				this.lblDay.TabIndex = 1;
				this.lblDay.Text = "ng?y";
				this.lblEvery.Location = new Point (8, 24);
				this.lblEvery.Name = "lblEvery";
				this.lblEvery.Size = new System.Drawing.Size (32, 16);
				this.lblEvery.TabIndex = 0;
				this.lblEvery.Text = "M?i";
				this.label1.Location = new Point (16, 24);
				this.label1.Name = "label1";
				this.label1.Size = new System.Drawing.Size (32, 16);
				this.label1.TabIndex = 0;
				this.label1.Text = "M?i";
				theControlArray3 = new Control[10];
				theControlArray3[0] = ((Control) this.chkSun);
				theControlArray3[1] = ((Control) this.chkSat);
				theControlArray3[2] = ((Control) this.chkFri);
				theControlArray3[3] = ((Control) this.chkThur);
				theControlArray3[4] = ((Control) this.chkWen);
				theControlArray3[5] = ((Control) this.chkTue);
				theControlArray3[6] = ((Control) this.chkMon);
				theControlArray3[7] = ((Control) this.label2);
				theControlArray3[8] = ((Control) this.cboWeekly);
				theControlArray3[9] = ((Control) this.label3);
				this.gbWeekly.Controls.AddRange (theControlArray3);
				this.gbWeekly.Location = new Point (112, 56);
				this.gbWeekly.Name = "gbWeekly";
				this.gbWeekly.Size = new System.Drawing.Size (336, 96);
				this.gbWeekly.TabIndex = 2;
				this.gbWeekly.TabStop = false;
				this.gbWeekly.Text = "M?i tu?n";
				this.chkSun.Location = new Point (80, 64);
				this.chkSun.Name = "chkSun";
				this.chkSun.Size = new System.Drawing.Size (48, 24);
				this.chkSun.TabIndex = 12;
				this.chkSun.Text = "CN";
				this.chkSat.Location = new Point (16, 64);
				this.chkSat.Name = "chkSat";
				this.chkSat.Size = new System.Drawing.Size (48, 24);
				this.chkSat.TabIndex = 11;
				this.chkSat.Text = "B?y";
				this.chkFri.Location = new Point (280, 48);
				this.chkFri.Name = "chkFri";
				this.chkFri.Size = new System.Drawing.Size (48, 24);
				this.chkFri.TabIndex = 10;
				this.chkFri.Text = "S?u";
				this.chkThur.Location = new Point (208, 48);
				this.chkThur.Name = "chkThur";
				this.chkThur.Size = new System.Drawing.Size (48, 24);
				this.chkThur.TabIndex = 9;
				this.chkThur.Text = "N?m";
				this.chkWen.Location = new Point (144, 48);
				this.chkWen.Name = "chkWen";
				this.chkWen.Size = new System.Drawing.Size (40, 24);
				this.chkWen.TabIndex = 8;
				this.chkWen.Text = "T?";
				this.chkTue.Location = new Point (80, 48);
				this.chkTue.Name = "chkTue";
				this.chkTue.Size = new System.Drawing.Size (40, 24);
				this.chkTue.TabIndex = 7;
				this.chkTue.Text = "Ba";
				this.chkMon.Location = new Point (16, 48);
				this.chkMon.Name = "chkMon";
				this.chkMon.Size = new System.Drawing.Size (40, 24);
				this.chkMon.TabIndex = 6;
				this.chkMon.Text = "Hai";
				this.label2.Location = new Point (88, 24);
				this.label2.Name = "label2";
				this.label2.Size = new System.Drawing.Size (72, 16);
				this.label2.TabIndex = 4;
				this.label2.Text = "tu?n v?o th?:";
				this.cboWeekly.Location = new Point (40, 24);
				theInt32Array4 = new int[4];
				theInt32Array4[0] = 1000;
				this.cboWeekly.Maximum = new decimal (theInt32Array4);
				theInt32Array5 = new int[4];
				theInt32Array5[0] = 1;
				this.cboWeekly.Minimum = new decimal (theInt32Array5);
				this.cboWeekly.Name = "cboWeekly";
				this.cboWeekly.Size = new System.Drawing.Size (40, 20);
				this.cboWeekly.TabIndex = 5;
				theInt32Array6 = new int[4];
				theInt32Array6[0] = 1;
				this.cboWeekly.Value = new decimal (theInt32Array6);
				this.label3.Location = new Point (8, 24);
				this.label3.Name = "label3";
				this.label3.Size = new System.Drawing.Size (32, 16);
				this.label3.TabIndex = 3;
				this.label3.Text = "M?i";
				theControlArray4 = new Control[5];
				theControlArray4[0] = ((Control) this.label6);
				theControlArray4[1] = ((Control) this.cboMonthly);
				theControlArray4[2] = ((Control) this.label5);
				theControlArray4[3] = ((Control) this.label4);
				theControlArray4[4] = ((Control) this.cboEveryDayOfMonth);
				this.gbMonthly.Controls.AddRange (theControlArray4);
				this.gbMonthly.Location = new Point (112, 56);
				this.gbMonthly.Name = "gbMonthly";
				this.gbMonthly.Size = new System.Drawing.Size (336, 96);
				this.gbMonthly.TabIndex = 3;
				this.gbMonthly.TabStop = false;
				this.gbMonthly.Text = "M?i th?ng";
				this.label6.Location = new Point (232, 24);
				this.label6.Name = "label6";
				this.label6.Size = new System.Drawing.Size (40, 16);
				this.label6.TabIndex = 7;
				this.label6.Text = "th?ng";
				this.cboMonthly.Location = new Point (176, 24);
				theInt32Array7 = new int[4];
				theInt32Array7[0] = 1000;
				this.cboMonthly.Maximum = new decimal (theInt32Array7);
				theInt32Array8 = new int[4];
				theInt32Array8[0] = 1;
				this.cboMonthly.Minimum = new decimal (theInt32Array8);
				this.cboMonthly.Name = "cboMonthly";
				this.cboMonthly.Size = new System.Drawing.Size (40, 20);
				this.cboMonthly.TabIndex = 6;
				theInt32Array9 = new int[4];
				theInt32Array9[0] = 1;
				this.cboMonthly.Value = new decimal (theInt32Array9);
				this.label5.Location = new Point (104, 24);
				this.label5.Name = "label5";
				this.label5.Size = new System.Drawing.Size (80, 16);
				this.label5.TabIndex = 5;
				this.label5.Text = "ng?y c?a m?i";
				this.label4.Location = new Point (16, 24);
				this.label4.Name = "label4";
				this.label4.Size = new System.Drawing.Size (32, 16);
				this.label4.TabIndex = 4;
				this.label4.Text = "M?i";
				this.cboEveryDayOfMonth.Location = new Point (48, 24);
				theInt32Array10 = new int[4];
				theInt32Array10[0] = 1000;
				this.cboEveryDayOfMonth.Maximum = new decimal (theInt32Array10);
				theInt32Array11 = new int[4];
				theInt32Array11[0] = 1;
				this.cboEveryDayOfMonth.Minimum = new decimal (theInt32Array11);
				this.cboEveryDayOfMonth.Name = "cboEveryDayOfMonth";
				this.cboEveryDayOfMonth.Size = new System.Drawing.Size (40, 20);
				this.cboEveryDayOfMonth.TabIndex = 3;
				theInt32Array12 = new int[4];
				theInt32Array12[0] = 1;
				this.cboEveryDayOfMonth.Value = new decimal (theInt32Array12);
				theControlArray5 = new Control[9];
				theControlArray5[0] = ((Control) this.dtpEndAtTime);
				theControlArray5[1] = ((Control) this.label8);
				theControlArray5[2] = ((Control) this.dtpBeginAtTime);
				theControlArray5[3] = ((Control) this.label7);
				theControlArray5[4] = ((Control) this.cboTimeUnit);
				theControlArray5[5] = ((Control) this.dtpOccursAtTime);
				theControlArray5[6] = ((Control) this.rbOccursEvery);
				theControlArray5[7] = ((Control) this.rbOccursAt);
				theControlArray5[8] = ((Control) this.cboDailyFrequencyTime);
				this.gbDailyFrequency.Controls.AddRange (theControlArray5);
				this.gbDailyFrequency.Location = new Point (8, 168);
				this.gbDailyFrequency.Name = "gbDailyFrequency";
				this.gbDailyFrequency.Size = new System.Drawing.Size (440, 104);
				this.gbDailyFrequency.TabIndex = 4;
				this.gbDailyFrequency.TabStop = false;
				this.gbDailyFrequency.Text = "T?n su?t trong ng?y";
				this.dtpEndAtTime.CustomFormat = "hh:mm:ss";
				this.dtpEndAtTime.Format = DateTimePickerFormat.Time;
				this.dtpEndAtTime.Location = new Point (336, 72);
				this.dtpEndAtTime.Name = "dtpEndAtTime";
				this.dtpEndAtTime.ShowUpDown = true;
				this.dtpEndAtTime.Size = new System.Drawing.Size (80, 20);
				this.dtpEndAtTime.TabIndex = 13;
				this.label8.Location = new Point (256, 72);
				this.label8.Name = "label8";
				this.label8.Size = new System.Drawing.Size (72, 16);
				this.label8.TabIndex = 12;
				this.label8.Text = "K?t th?c l?c:";
				this.dtpBeginAtTime.CustomFormat = "hh:mm:ss";
				this.dtpBeginAtTime.Format = DateTimePickerFormat.Time;
				this.dtpBeginAtTime.Location = new Point (336, 40);
				this.dtpBeginAtTime.Name = "dtpBeginAtTime";
				this.dtpBeginAtTime.RightToLeft = System.Windows.Forms.RightToLeft.No;
				this.dtpBeginAtTime.ShowUpDown = true;
				this.dtpBeginAtTime.Size = new System.Drawing.Size (80, 20);
				this.dtpBeginAtTime.TabIndex = 11;
				this.label7.Location = new Point (256, 40);
				this.label7.Name = "label7";
				this.label7.Size = new System.Drawing.Size (64, 16);
				this.label7.TabIndex = 10;
				this.label7.Text = "B?t ??u l?c:";
				theObjectArray = new object[2];
				theObjectArray[0] = "Hour(s)";
				theObjectArray[1] = "Minute(s)";
				this.cboTimeUnit.Items.AddRange (theObjectArray);
				this.cboTimeUnit.Location = new Point (184, 40);
				this.cboTimeUnit.Name = "cboTimeUnit";
				this.cboTimeUnit.Size = new System.Drawing.Size (64, 21);
				this.cboTimeUnit.TabIndex = 9;
				this.dtpOccursAtTime.CustomFormat = "hh:mm:ss";
				this.dtpOccursAtTime.Format = DateTimePickerFormat.Time;
				this.dtpOccursAtTime.Location = new Point (128, 16);
				this.dtpOccursAtTime.Name = "dtpOccursAtTime";
				this.dtpOccursAtTime.ShowUpDown = true;
				this.dtpOccursAtTime.Size = new System.Drawing.Size (80, 20);
				this.dtpOccursAtTime.TabIndex = 5;
				this.rbOccursEvery.Location = new Point (16, 40);
				this.rbOccursEvery.Name = "rbOccursEvery";
				this.rbOccursEvery.Size = new System.Drawing.Size (112, 24);
				this.rbOccursEvery.TabIndex = 4;
				this.rbOccursEvery.Text = "Sao l?u v?o m?i";
				this.rbOccursEvery.CheckedChanged += new EventHandler (this.rbOccursEvery_CheckedChanged);
				this.rbOccursAt.Location = new Point (16, 16);
				this.rbOccursAt.Name = "rbOccursAt";
				this.rbOccursAt.TabIndex = 3;
				this.rbOccursAt.Text = "Sao l?u v?o l?c:";
				this.rbOccursAt.CheckedChanged += new EventHandler (this.rbOccursAt_CheckedChanged);
				this.cboDailyFrequencyTime.Location = new Point (128, 40);
				theInt32Array13 = new int[4];
				theInt32Array13[0] = 1000;
				this.cboDailyFrequencyTime.Maximum = new decimal (theInt32Array13);
				theInt32Array14 = new int[4];
				theInt32Array14[0] = 1;
				this.cboDailyFrequencyTime.Minimum = new decimal (theInt32Array14);
				this.cboDailyFrequencyTime.Name = "cboDailyFrequencyTime";
				this.cboDailyFrequencyTime.Size = new System.Drawing.Size (40, 20);
				this.cboDailyFrequencyTime.TabIndex = 8;
				theInt32Array15 = new int[4];
				theInt32Array15[0] = 1;
				this.cboDailyFrequencyTime.Value = new decimal (theInt32Array15);
				this.cmdOk.Location = new Point (152, 328);
				this.cmdOk.Name = "cmdOk";
				this.cmdOk.Size = new System.Drawing.Size (72, 23);
				this.cmdOk.TabIndex = 5;
				this.cmdOk.Text = "Ok";
				this.cmdOk.Click += new EventHandler (this.cmdOk_Click);
				this.cmdCancel.Location = new Point (256, 328);
				this.cmdCancel.Name = "cmdCancel";
				this.cmdCancel.TabIndex = 6;
				this.cmdCancel.Text = "Cancel";
				this.cmdCancel.Click += new EventHandler (this.cmdCancel_Click);
				theControlArray6 = new Control[7];
				theControlArray6[0] = ((Control) this.rdBackupAuto);
				theControlArray6[1] = ((Control) this.rdBackupManual);
				theControlArray6[2] = ((Control) this.gbMonthly);
				theControlArray6[3] = ((Control) this.gbDailyFrequency);
				theControlArray6[4] = ((Control) this.gbWeekly);
				theControlArray6[5] = ((Control) this.gbOccurs);
				theControlArray6[6] = ((Control) this.gbDaily);
				this.gbBackup.Controls.AddRange (theControlArray6);
				this.gbBackup.Location = new Point (8, 40);
				this.gbBackup.Name = "gbBackup";
				this.gbBackup.Size = new System.Drawing.Size (456, 280);
				this.gbBackup.TabIndex = 7;
				this.gbBackup.TabStop = false;
				this.gbBackup.Text = "Backup";
				this.rdBackupAuto.Location = new Point (296, 24);
				this.rdBackupAuto.Name = "rdBackupAuto";
				this.rdBackupAuto.Size = new System.Drawing.Size (120, 24);
				this.rdBackupAuto.TabIndex = 6;
				this.rdBackupAuto.Text = "Backup theo l?ch";
				this.rdBackupAuto.CheckedChanged += new EventHandler (this.rdBackupAuto_CheckedChanged);
				this.rdBackupManual.Location = new Point (64, 24);
				this.rdBackupManual.Name = "rdBackupManual";
				this.rdBackupManual.Size = new System.Drawing.Size (128, 24);
				this.rdBackupManual.TabIndex = 5;
				this.rdBackupManual.Text = "Backup tr?c ti?p";
				this.rdBackupManual.CheckedChanged += new EventHandler (this.rdBackupManual_CheckedChanged);
				this.txtFilePath.Location = new Point (8, 8);
				this.txtFilePath.Name = "txtFilePath";
				this.txtFilePath.Size = new System.Drawing.Size (288, 20);
				this.txtFilePath.TabIndex = 9;
				this.txtFilePath.Text = "";
				this.cmdOpenFile.Location = new Point (304, 8);
				this.cmdOpenFile.Name = "cmdOpenFile";
				this.cmdOpenFile.Size = new System.Drawing.Size (32, 23);
				this.cmdOpenFile.TabIndex = 10;
				this.cmdOpenFile.Text = "...";
				this.cmdOpenFile.Click += new EventHandler (this.cmdOpenFile_Click);
				this.AutoScaleBaseSize = new System.Drawing.Size (5, 13);
				base.ClientSize = new System.Drawing.Size (472, 365);
				theControlArray7 = new Control[5];
				theControlArray7[0] = ((Control) this.cmdOpenFile);
				theControlArray7[1] = ((Control) this.txtFilePath);
				theControlArray7[2] = ((Control) this.gbBackup);
				theControlArray7[3] = ((Control) this.cmdCancel);
				theControlArray7[4] = ((Control) this.cmdOk);
				base.Controls.AddRange (theControlArray7);
				base.MaximizeBox = false;
				base.MinimizeBox = false;
				base.Name = "frmBackupSchedule";
				base.StartPosition = FormStartPosition.CenterParent;
				this.Text = "L?ch Backup";
				base.Load += new EventHandler (this.frmBackupSchedule_Load);
				this.gbOccurs.ResumeLayout (false);
				this.gbDaily.ResumeLayout (false);
				((ISupportInitialize) this.cboDaily).EndInit ();
				this.gbWeekly.ResumeLayout (false);
				((ISupportInitialize) this.cboWeekly).EndInit ();
				this.gbMonthly.ResumeLayout (false);
				((ISupportInitialize) this.cboMonthly).EndInit ();
				((ISupportInitialize) this.cboEveryDayOfMonth).EndInit ();
				this.gbDailyFrequency.ResumeLayout (false);
				((ISupportInitialize) this.cboDailyFrequencyTime).EndInit ();
				this.gbBackup.ResumeLayout (false);
				base.ResumeLayout (false);
				return;
			}
			
			private void rbBackup_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbBackup.Enabled = true;
				return;
			}
			
			private void rbDaily_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbDaily.Visible = true;
				this.gbMonthly.Visible = false;
				this.gbWeekly.Visible = false;
				return;
			}
			
			private void rbMonthly_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbMonthly.Visible = true;
				this.gbDaily.Visible = false;
				this.gbWeekly.Visible = false;
				return;
			}
			
			private void rbOccursAt_CheckedChanged (object sender, EventArgs e)
			
			{
				this.cboDailyFrequencyTime.Enabled = false;
				this.cboTimeUnit.Enabled = false;
				this.dtpBeginAtTime.Enabled = false;
				this.dtpEndAtTime.Enabled = false;
				this.dtpOccursAtTime.Enabled = true;
				return;
			}
			
			private void rbOccursEvery_CheckedChanged (object sender, EventArgs e)
			
			{
				this.dtpOccursAtTime.Enabled = false;
				this.cboDailyFrequencyTime.Enabled = true;
				this.cboTimeUnit.Enabled = true;
				this.dtpBeginAtTime.Enabled = true;
				this.dtpEndAtTime.Enabled = true;
				this.cboTimeUnit.SelectedIndex = 1;
				return;
			}
			
			private void rbWeekly_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbWeekly.Visible = true;
				this.gbDaily.Visible = false;
				this.gbMonthly.Visible = false;
				return;
			}
			
			private void rdBackupAuto_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbOccurs.Enabled = true;
				this.gbDailyFrequency.Enabled = true;
				this.gbDaily.Enabled = true;
				this.gbWeekly.Enabled = true;
				this.gbMonthly.Enabled = true;
				this.txtFilePath.Enabled = false;
				return;
			}
			
			private void rdBackupManual_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbOccurs.Enabled = false;
				this.gbDailyFrequency.Enabled = false;
				this.gbDaily.Enabled = false;
				this.gbWeekly.Enabled = false;
				this.gbMonthly.Enabled = false;
				this.txtFilePath.Enabled = true;
				return;
			}
			
			private void rdRestore_CheckedChanged (object sender, EventArgs e)
			
			{
				this.gbBackup.Enabled = false;
				this.rdBackupAuto.Checked = false;
				this.rdBackupManual.Checked = false;
				return;
			}
			
			private void Thread1 ()
			
			{
				this.sp = new SplashScreen ();
				this.sp.Show ();
				this.sp.BeginDisplay ();
				return;
			}
			
		#endregion
	}
	
}

